/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author kenny
 */
@Entity
@Table(name = "periodoxsalon")
@NamedQueries({
    @NamedQuery(name = "Periodoxsalon.findAll", query = "SELECT p FROM Periodoxsalon p"),
    @NamedQuery(name = "Periodoxsalon.findByNPrdSlnId", query = "SELECT p FROM Periodoxsalon p WHERE p.nPrdSlnId = :nPrdSlnId"),
    @NamedQuery(name = "Periodoxsalon.findByVEstado", query = "SELECT p FROM Periodoxsalon p WHERE p.vEstado = :vEstado"),
    @NamedQuery(name = "Periodoxsalon.findByIdHorario", query = "SELECT p FROM Periodoxsalon p WHERE p.nHorId = :nHorId")})
public class Periodoxsalon implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "nPrdSlnId")
    private Integer nPrdSlnId;
    @Column(name = "vEstado")
    private String vEstado;
    @JoinColumn(name = "SlnId", referencedColumnName = "nSlnId")
    @ManyToOne(optional = false)
    private Salon slnId;
    @JoinColumn(name = "nPrdId", referencedColumnName = "nPrdId")
    @ManyToOne(optional = false)
    private Periodo nPrdId;
    @JoinColumn(name = "nHorId", referencedColumnName = "nHorId")
    @ManyToOne(optional = false)
    private Horario nHorId;
    @JoinColumn(name = "nDcnClsId", referencedColumnName = "nDcnClsId")
    @ManyToOne(optional = false)
    private Docentexclase nDcnClsId;

    public Periodoxsalon() {
    }

    public Periodoxsalon(Integer nPrdSlnId) {
        this.nPrdSlnId = nPrdSlnId;
    }

    public Integer getNPrdSlnId() {
        return nPrdSlnId;
    }

    public void setNPrdSlnId(Integer nPrdSlnId) {
        this.nPrdSlnId = nPrdSlnId;
    }

    public String getVEstado() {
        return vEstado;
    }

    public void setVEstado(String vEstado) {
        this.vEstado = vEstado;
    }

    public Salon getSlnId() {
        return slnId;
    }

    public void setSlnId(Salon slnId) {
        this.slnId = slnId;
    }

    public Periodo getNPrdId() {
        return nPrdId;
    }

    public void setNPrdId(Periodo nPrdId) {
        this.nPrdId = nPrdId;
    }

    public Horario getNHorId() {
        return nHorId;
    }

    public void setNHorId(Horario nHorId) {
        this.nHorId = nHorId;
    }

    public Docentexclase getNDcnClsId() {
        return nDcnClsId;
    }

    public void setNDcnClsId(Docentexclase nDcnClsId) {
        this.nDcnClsId = nDcnClsId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nPrdSlnId != null ? nPrdSlnId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Periodoxsalon)) {
            return false;
        }
        Periodoxsalon other = (Periodoxsalon) object;
        if ((this.nPrdSlnId == null && other.nPrdSlnId != null) || (this.nPrdSlnId != null && !this.nPrdSlnId.equals(other.nPrdSlnId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.Periodoxsalon[ nPrdSlnId=" + nPrdSlnId + " ]";
    }
    
}
